#ifndef NETMANAGER_H
#define NETMANAGER_H
#include <QTcpServer>
#include <QTcpSocket>
#include <QObject>
#include <QMap>
#include <dbmanager.h>

class NetManager : public QObject
{
    Q_OBJECT
public:
    NetManager(QObject *parent = nullptr);
    ~NetManager();

    bool startServer(quint16 port);

private slots:
    void onNewConnection();

private:
    QTcpServer *tcpServer;                      // TCP服务器
};

#endif // NETMANAGER_H
